package _base0to1;

/**
 * 1822. 数组元素积的符号
 */
public class No1822 {
    public int arraySign(int[] nums) {
        int qua = 0;
        for (int num : nums) {
            if (num == 0) return 0;
            else if (num < 0) qua++;
        }
        return qua % 2 == 0 ? 1 : -1;
    }
}
